import 'package:flutter/material.dart';
import 'package:flutter_plant_ui/constants.dart';
import 'package:flutter_plant_ui/screen/detail/details_screen.dart';

import 'featurred_plants.dart';
import 'header_with_search_box.dart';
import 'recomend_plants.dart';
import 'title_with_more_btn.dart';

class Body extends StatefulWidget {
  const Body({Key key}) : super(key: key);

  @override
  _BodyState createState() => _BodyState();
}

class _BodyState extends State<Body> {
  List<String> imgList = [
    "assets/images/bottom_img_1.png",
    "assets/images/bottom_img_2.png"
  ];
  @override
  Widget build(BuildContext context) {
    Size size = MediaQuery.of(context).size;
    return SingleChildScrollView(
      child: Column(
        children: [
          HeaderWidthSearchBox(size: size),
          TitleWidthMoreBtn(
            title: "Recommended",
            press: () {
              Navigator.push(
                context,
                MaterialPageRoute(
                  builder: (context) => DetailsScreen(),
                ),
              );
            },
          ),
          RecomendsPlants(),
          TitleWidthMoreBtn(
              title: "Featured Plants",
              press: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) => DetailsScreen(),
                  ),
                );
              }),
          FeaturedPlants(imgList: imgList),
          SizedBox(height: kDefaultPadding),
        ],
      ),
    );
  }
}
